What about $'s?

If you have converted to LATEX from plain or $\cal {A}$ $\cal {M}$$\cal {S}$-TEX, you will probably be wondering why there has been no mention of $ and $$.

In these systems math mode is surrounded by $'s and display math mode is surrounded by $$. This has certain drawbacks over the LATEX system as it is difficult for your text editor to match $'s as it is hard to tell which ones are starting math mode and which are ending it. TEX will also get confused if you miss a $ out.

The (incorrect) input

let (a,b,c)$ be a Pythagorean triple, i.e.\ three 
integers such that $a^{2}+b^{2}=c^{2}$.
produces the slightly mysterious error message
! Missing $ inserted.
<inserted text> 
                $
<to be read again> 
                   ^
l.56 ...triple, i.e.\ three integers such that $a^
                                                  {2}+b^{2}=c^{2}$
?

Note that it reports the wrong error and in the wrong place, the use of the ^ command out of math mode. TEX has typeset `be a ... such that' in math mode and exited math mode at the $ after `such that'. If you had made the equivalent LATEX error, LATEX has a better idea of what you indended:

let (a,b,c)\) be a Pythagorean triple, i.e.\ three 
integers such that \(a^{2}+b^{2}=c^{2}\)
The error message may still be unintelligable, but at least it reports the error in the right place, you have used \) to end math mode when you were not in math mode (as you omitted the \( which should have been before the (a,b,c)).
LaTeX error.  See LaTeX manual for explanation.
              Type  H <return>  for immediate help.
! Bad math environment delimiter.
\@latexerr ...for immediate help.}\errmessage {#1}
                                                  
\)...ifinner $\else \@badmath \fi \else \@badmath 
                                                  \fi 
l.56 let (a,b,c)\)
                   be a Pythagorean triple, i.e.\ three integers such that \...

?

The single dollar is sometimes useful for small sections of math.
\begin{eg}\begin{egbox}
Let $G$\ be a $p$-group
\end{egbox}\hfill\begin{egbox}
\verb\vert Let $G$ be a $p$-group\vert
\end{egbox}\end{eg}

The double dollar is not always equivalent to \[ ... \], and so should not be used if you want your LATEX file to be compatible with different styles and style options (try the fleqn style option).